<apes-header>
  <apes-button-list class="buttonList" [ctx]="ctx" [buttonBarMetadata]="buttonBar"
                    (click)="onEvent($event)"></apes-button-list>
</apes-header>
<!-- 订货周期监控 -->
<apes-content>
  <apes-card [apesBordered]="false">
    <!-- 查询条件(固定) -->
    <div class="boxShowFlex">
      <!-- 下单时间 -->
      <div apes-col apesSpan="8">
        <div>
          <span>下单时间</span>
          <div class="boxDiv">
            <apes-range-picker [(ngModel)]='mdjcTime' [apesFormat]="'yyyy-MM-dd'"></apes-range-picker>
          </div>
        </div>
        <!--<p [ngStyle]="{ display: hind }"><i class="anticon anticon-exclamation-circle-o"></i> 必填！最大时间为一个月 </p>-->
      </div>
      <!-- 询价区域 -->
      <div apes-col apesSpan="8">
        <span>询价区域</span>
        <ng-select style="width: 240px; display: inline-block;"
                   clearAllText
                   [items]="inquiry"
                   bindLabel="BJZ"
                   bindValue="BJZ"
                   [placeholder]="'选填'" [notFoundText]="'无法找到'" typeToSearchText [(ngModel)]="inquiryID">
        </ng-select>
      </div>
      <!-- 车牌号码 -->
      <div apes-col apesSpan="8">
        <span>车牌</span>
        <input type="text" apes-input placeholder="请输入车牌号码" [(ngModel)]="carNum" style="width: 240px;">
      </div>
      <!-- 门店 -->
      <div apes-col apesSpan="8">
        <span>门店</span>
        <ng-select style="width: 240px; display: inline-block;"
                   [items]="store"
                   bindLabel="MDMC"
                   bindValue="MDID"
                   clearAllText [placeholder]="'选填'" [(ngModel)]="storeID" [notFoundText]="'无法找到'" typeToSearchText>
        </ng-select>
      </div>
      <!-- 供应商 -->
      <div apes-col apesSpan="8">
        <span>供应商</span>
        <ng-select style="width: 240px; display: inline-block;"
                   clearAllText
                   [items]="supplier"
                   bindLabel="GYSMC"
                   bindValue="GYSID"
                   [placeholder]="'选填'" [notFoundText]="'无法找到'" typeToSearchText [(ngModel)]="supplierID">
        </ng-select>
      </div>
      <!-- 状态 -->
      <div apes-col apesSpan="8" style="text-align: center">
        <label apes-col apesSpan="6" apes-checkbox disabled [(ngModel)]="checkOne">未入库</label>
        <label apes-col apesSpan="6" apes-checkbox [(ngModel)]="checkTwo">已超时</label>
        <!--<label apes-col apesSpan="6" apes-checkbox disabled [(ngModel)]="checkThe">全车件</label>-->
      </div>
    </div>

    <!-- 查询条件（外加） -->
    <div class="boxShow" apes-row apesGutter="24" apesSpan="16" [ngStyle]="{ display: show }">
      <!-- 销售组 -->
      <div apes-col apesSpan="8">
        <span>销售组</span>
        <ng-select  style="width: 240px; display: inline-block;"
                    typeToSearchText
                    [items]="sale"
                    multiple="true"
                    bindLabel="XSZMC"
                    bindValue="XSZID"
                    placeholder="选填，可多选"
                    [(ngModel)]="saleID"
                    [notFoundText]="'无法找到'">
        </ng-select>
      </div>
      <!-- 采购员 -->
      <div apes-col apesSpan="8">
        <span>采购员</span>
        <input type="text" apes-input placeholder="请输入采购员名称" [(ngModel)]="purchaseNum" style="width: 240px;">
      </div>
      <!-- 公司 -->
      <div apes-col apesSpan="8">
        <span>公司</span>
        <ng-select style="width: 240px; display: inline-block;"
                   typeToSearchText
                   [items]="companyData"
                   multiple="true"
                   bindLabel="name"
                   bindValue="id"
                   placeholder="选填，可多选"
                   [(ngModel)]="companyList"
                   [notFoundText]="'无法找到'">
        </ng-select>
      </div>
      <!-- 仓库库区 -->
      <div apes-col apesSpan="8">
        <span>仓库库区</span>
        <ng-select style="width: 240px; display: inline-block;"
                   clearAllText
                   [items]="warehouse"
                   bindLabel="CKKQMC"
                   bindValue="CKKQID"
                   [placeholder]="'选填'" [notFoundText]="'无法找到'" typeToSearchText [(ngModel)]="warehouseID">
        </ng-select>
      </div>
    </div>

    <!-- 显示内容 -->
    <div apes-row apesGutter="24" apesSpan="16">

      <!-- 左侧 数据展示 -->
      <div>
        <ag-grid-angular #grid
                         style="width: 100%;" [ngStyle]="{ height: height }" class="ag-theme-balham"
                         enableColResize="true"
                         enableSorting="true"
                         enableFilter="true"

                         suppressLoadingOverlay="true"
                         [modules]="modules"
                         [rowData]="rowData"
                         [gridOptions]="gridOptions"
                         [columnDefs]="columnDefs"
                         [pinnedBottomRowData]="pinnedBottomRowData"
                         [rowClassRules]="rowClassRules">
        </ag-grid-angular>
      </div>
    </div>
  </apes-card>
</apes-content>

